package com.gxc.oauth2.repository;

import com.gxc.oauth2.entity.TbRolePermissionEntity;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;

/**
 * @author GongXincheng
 * @since 2019-10-11 17:45
 */
public interface RolePermissionRepository extends JpaRepository<TbRolePermissionEntity, Long> {

    List<TbRolePermissionEntity> findByRoleId(Long roleId);

    List<TbRolePermissionEntity> findByRoleIdIn(List<Long> roleIdList);

    List<TbRolePermissionEntity> findByPermissionId(Long permissionId);

}
